﻿using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using Happy.StateManager.Test.Stub;

namespace Happy.StateManager.Test
{
    [TestClass]
    public class StateMachineTest
    {
        [TestMethod]
        public void ValidSave_Test()
        {
            var order = new Order { Status = Status.UnSaved };
            order.Save();

            Assert.AreEqual(Status.Saved, order.Status);
        }

        [TestMethod]
        [ExpectedException(typeof(StateScheduleException))]
        public void InvalidSubmit_Test()
        {
            var order = new Order { Status = Status.UnSaved };
            order.Submit();
        }
    }
}
